import { BaseService, Service, Permission } from '@/cool';

@Service('crm/order')
export default class extends BaseService {
	constructor() {
		super();
		this.sellerShopStatistics = this.sellerShopStatistics.bind(this);
		this.labelsStatistics = this.labelsStatistics.bind(this);
		this.relationStatistics = this.relationStatistics.bind(this);
	}
	@Permission('orderStatistics')
	orderList(params) {
		return this.request({
			url: '/orderStatistics',
			params: {
				...params
			}
		});
	}
	@Permission('productStatistics')
	productStatistics(params) {
		return this.request({
			url: '/productStatistics',
			params: {
				...params
			}
		});
	}
	@Permission('positionStatistics')
	positionStatistics(params) {
		return this.request({
			url: '/positionStatistics',
			params: {
				...params
			}
		});
	}
	@Permission('staffStatistics')
	staffStatistics(params) {
		return this.request({
			url: '/staffStatistics',
			params: {
				...params
			}
		});
	}
	@Permission('departmentStatistics')
	departmentStatistics(params) {
		return this.request({
			url: '/departmentStatistics',
			params: {
				...params
			}
		});
	}
	@Permission('timeStatistics')
	timeStatistics(params) {
		return this.request({
			url: '/timeStatistics',
			params: {
				...params
			}
		});
	}
	// 产品报表
	@Permission('productAnalysis')
	productAnalysis(params) {
		return this.request({
			url: '/productAnalysis',
			params: {
				...params
			}
		});
	}
	@Permission('positionExport')
	positionExport(params) {
		return this.request({
			url: '/positionExport',
			params: {
				...params
			}
		});
	}
	@Permission('staffExport')
	staffExport(params) {
		return this.request({
			url: '/staffExport',
			params: {
				...params
			}
		});
	}
	// 微信统计
	@Permission('wechatStatistics')
	wechatStatistics(params) {
		return this.request({
			url: '/wechatStatistics',
			params: {
				...params
			}
		});
	}
	@Permission('wechatExport')
	wechatExport(params) {
		return this.request({
			url: '/wechatExport',
			params: {
				...params
			}
		});
	}
	// 店铺统计
	@Permission('sellerShopStatistics')
	sellerShopStatistics(params) {
		return this.request({
			url: '/sellerShopStatistics',
			params: {
				...params
			}
		});
	}
	// 标签统计
	@Permission('labelsStatistics')
	labelsStatistics(params) {
		return this.request({
			url: '/labelsStatistics',
			params: {
				...params
			}
		});
	}
	// 渠道统计
	@Permission('relationStatistics')
	relationStatistics(params) {
		return this.request({
			url: '/relationStatistics',
			params: {
				...params
			}
		});
	}
	//订单统计报表
	@Permission('orderExport')
	orderExport(params) {
		return this.request({
			url: '/orderExport',
			params: {
				...params
			}
		});
	}
	//组织统计报表
	@Permission('departmentExport')
	departmentExport(params) {
		return this.request({
			url: '/departmentExport',
			params: {
				...params
			}
		});
	}
	// 产品统计
	@Permission('productExport')
	productExport(params) {
		return this.request({
			url: '/productExport',
			params: {
				...params
			}
		});
	}
	// 店铺统计
	@Permission('sellerShopExport')
	sellerShopExport(params) {
		return this.request({
			url: '/sellerShopExport',
			params: {
				...params
			}
		});
	}
	// 标签统计
	@Permission('labelsExport')
	labelsExport(params) {
		return this.request({
			url: '/labelsExport',
			params: {
				...params
			}
		});
	}
	// 渠道报表导出
	@Permission('relationExport')
	relationExport(params) {
		return this.request({
			url: '/relationExport',
			params: {
				...params
			}
		});
	}
	@Permission('labelExport')
	labelExport(params) {
		return this.request({
			url: '/labelExport',
			params: {
				...params
			}
		});
	}
	@Permission('goodsTljMoney')
	async goodsTljMoney(params) {
		return this.request({
			url: '/goodsTljMoney',
			method: 'POST',
			data: {
				...params
			}
		});
	}
}
